home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 72 / IOPROG_72.ISO / soft / c++ / NCTDiscWriter2.exe / {app} / MS VB 6.0 Samples / TestVBDataCDWriter / frmDiscInfo.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2002-12-05  |  5.7 KB  |  187 lines

  1. VERSION 5.00
  2. Begin VB.Form frmDiscInfo 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Disc Info"
  5.    ClientHeight    =   2115
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   5925
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   2115
  13.    ScaleWidth      =   5925
  14.    StartUpPosition =   2  'CenterScreen
  15.    Begin VB.CommandButton EjectBtn 
  16.       Caption         =   "Eject"
  17.       Height          =   375
  18.       Left            =   4080
  19.       TabIndex        =   12
  20.       Top             =   1050
  21.       Width           =   1725
  22.    End
  23.    Begin VB.CommandButton OKBtn 
  24.       Caption         =   "OK"
  25.       Height          =   375
  26.       Left            =   4080
  27.       TabIndex        =   11
  28.       Top             =   1650
  29.       Width           =   1725
  30.    End
  31.    Begin VB.CommandButton EraseBtn 
  32.       Caption         =   "Erase"
  33.       Height          =   375
  34.       Left            =   4080
  35.       TabIndex        =   10
  36.       Top             =   600
  37.       Width           =   1725
  38.    End
  39.    Begin VB.CommandButton RefreshBtn 
  40.       Caption         =   "Refresh"
  41.       Height          =   375
  42.       Left            =   4080
  43.       TabIndex        =   9
  44.       Top             =   150
  45.       Width           =   1725
  46.    End
  47.    Begin VB.Frame Frame2 
  48.       Caption         =   "Disc Total"
  49.       Height          =   1935
  50.       Left            =   60
  51.       TabIndex        =   0
  52.       Top             =   90
  53.       Width           =   3810
  54.       Begin VB.Label Label11 
  55.          Caption         =   "Type:"
  56.          Height          =   195
  57.          Left            =   150
  58.          TabIndex        =   8
  59.          Top             =   420
  60.          Width           =   555
  61.       End
  62.       Begin VB.Label cdTypeLbl 
  63.          Alignment       =   1  'Right Justify
  64.          BorderStyle     =   1  'Fixed Single
  65.          Height          =   285
  66.          Left            =   1260
  67.          TabIndex        =   7
  68.          Top             =   330
  69.          Width           =   2415
  70.       End
  71.       Begin VB.Label Label13 
  72.          Caption         =   "Used Space:"
  73.          Height          =   195
  74.          Left            =   150
  75.          TabIndex        =   6
  76.          Top             =   1200
  77.          Width           =   945
  78.       End
  79.       Begin VB.Label cdStatusLbl 
  80.          Alignment       =   1  'Right Justify
  81.          BorderStyle     =   1  'Fixed Single
  82.          Height          =   285
  83.          Left            =   1260
  84.          TabIndex        =   5
  85.          Top             =   720
  86.          Width           =   2415
  87.       End
  88.       Begin VB.Label Label3 
  89.          Caption         =   "Status:"
  90.          Height          =   195
  91.          Left            =   150
  92.          TabIndex        =   4
  93.          Top             =   810
  94.          Width           =   855
  95.       End
  96.       Begin VB.Label cdUsedSpaceLbl 
  97.          Alignment       =   1  'Right Justify
  98.          BorderStyle     =   1  'Fixed Single
  99.          Caption         =   "0"
  100.          Height          =   285
  101.          Left            =   1260
  102.          TabIndex        =   3
  103.          Top             =   1110
  104.          Width           =   2415
  105.       End
  106.       Begin VB.Label cdEstUsedSpaceLbl 
  107.          Alignment       =   1  'Right Justify
  108.          BorderStyle     =   1  'Fixed Single
  109.          Caption         =   "0"
  110.          Height          =   285
  111.          Left            =   1260
  112.          TabIndex        =   2
  113.          Top             =   1500
  114.          Width           =   2415
  115.       End
  116.       Begin VB.Label Label8 
  117.          Caption         =   "Est. Space:"
  118.          Height          =   195
  119.          Left            =   150
  120.          TabIndex        =   1
  121.          Top             =   1590
  122.          Width           =   1065
  123.       End
  124.    End
  125. Attribute VB_Name = "frmDiscInfo"
  126. Attribute VB_GlobalNameSpace = False
  127. Attribute VB_Creatable = False
  128. Attribute VB_PredeclaredId = True
  129. Attribute VB_Exposed = False
  130. Private Sub EjectBtn_Click()
  131.     frmTestVBDataCDWriter.DataCDWriter1.Eject
  132.     RefreshFormData
  133. End Sub
  134. Private Sub EraseBtn_Click()
  135.     frmTestVBDataCDWriter.EraseDisc
  136. End Sub
  137. Private Sub Form_Load()
  138.     RefreshFormData
  139. End Sub
  140. Private Sub OKBtn_Click()
  141.     Me.Hide
  142. End Sub
  143. Private Sub RefreshBtn_Click()
  144.     RefreshFormData
  145. End Sub
  146. Private Sub RefreshFormData()
  147.     frmTestVBDataCDWriter.RefreshDiskInfo
  148.     cdUsedSpaceLbl.Caption = Format((frmTestVBDataCDWriter.DataCDWriter1.cdUsedSpace / 1024) / 1024, "#0.000") & " MB"
  149.     cdEstUsedSpaceLbl.Caption = Format((frmTestVBDataCDWriter.DataCDWriter1.GetDataVolumeBurnSize / 1024) / 1024, "#0.000") & " MB"
  150.        
  151.     Select Case frmTestVBDataCDWriter.DataCDWriter1.cdType
  152.     Case WRITEONCE:
  153.         cdTypeLbl.Caption = "CD-R, CD-ROM"
  154.         EjectBtn.Enabled = True
  155.         EraseBtn.Enabled = False
  156.         
  157.     Case ERASABLE:
  158.         cdTypeLbl.Caption = "CD-RW"
  159.         EjectBtn.Enabled = True
  160.         EraseBtn.Enabled = True
  161.         
  162.     Case RANDOMACCESS
  163.         cdTypeLbl.Caption = "DVD-RAM"
  164.         EjectBtn.Enabled = True
  165.         EraseBtn.Enabled = False
  166.         
  167.     Case NODISC:
  168.         cdTypeLbl.Caption = "No Disc"
  169.         EjectBtn.Enabled = False
  170.         EraseBtn.Enabled = False
  171.         cdUsedSpaceLbl.Caption = 0
  172.         
  173.     End Select
  174.     Select Case frmTestVBDataCDWriter.DataCDWriter1.cdStatus
  175.     Case BLANK:
  176.         cdStatusLbl.Caption = "Blank"
  177.         cdUsedSpaceLbl.Caption = "0"
  178.     Case WRITEBLE:
  179.         cdStatusLbl.Caption = "Open"
  180.     Case NOTWRITEBLE:
  181.         cdStatusLbl.Caption = "Closed"
  182.     Case UNRECOGNIZED:
  183.         cdStatusLbl.Caption = "Unknown"
  184.         cdUsedSpaceLbl.Caption = "0"
  185.     End Select
  186. End Sub
  187.